package edu.bbu.bibliospring.common.dto;

/**
 * Created by anna on 6/5/14.
 */
public class BookDto extends DataTransferObject {

    private Long id;
    private AuthorDto author;
    private String title;
    private Long yearOfPublishing;
    private String editor;

    public BookDto() {super(BookDto.class.getName());}

    public BookDto(String modelClass) {super(modelClass);}

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public AuthorDto getAuthor() {
        return author;
    }

    public void setAuthor(AuthorDto author) {
        this.author = author;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Long getYearOfPublishing() {
        return yearOfPublishing;
    }

    public void setYearOfPublishing(Long yearOfPublishing) {
        this.yearOfPublishing = yearOfPublishing;
    }

    public String getEditor() {
        return editor;
    }

    public void setEditor(String editor) {
        this.editor = editor;
    }

    @Override
    public String toString() {
        return "BookDto [id=" + this.id + ", author=" + this.author.getFirstName() + " " + this.author.getLastName()
                + ", title=" + this.title + ", yearOfPublishing=" + this.yearOfPublishing + ", editor=" + this.editor + "]";
    }
}
